<?php


namespace app\common\model;


use think\model\concern\SoftDelete;

class Verification extends Base
{
    use SoftDelete;
    public $tableName = '核销员';               // 数据表名称
    public $logId     = ['id'];   // 日志操作相关标识
    protected $table = "maniac_verification";
    protected $createTime = "created_at";
    protected $updateTime = "updated_at";
    protected $deleteTime = 'deleted_at';
    public $autoWriteTimestamp = "datetime";
    public function getBindingTxtAttr($value,$data){
        $txt = [0=>"否",1=>"是"];
        return $txt[$data['is_binding']];
    }
    public function getMemberNicknameAttr($value,$data){
        return $data['member_id'] ? Members::field('id,nickname')->get($data['member_id'])['nickname'] : "无";
    }
}